/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ntb.controllers;

import com.ntb.common.SecuredAction;
import com.ntb.entities.UserGroups;
import com.ntb.models.UserGroupsDAO;
import com.ntb.models.impl.UserGroupsDAOImpl;
import java.util.Iterator;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

/**
 *
 * @author Thinh Hung
 */
public class PermissionListingAction extends SecuredAction {

    @Override
    public ActionForward ntbExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
        UserGroupsDAO groupDao = new UserGroupsDAOImpl();
        Iterator<UserGroups> groupList = groupDao.getList();
        request.setAttribute("groupList", groupList);
        return mapping.getInputForward();
    }
}
